package music.play.config;

public enum PlayerEnum {
    MadPlay("madplay"), Mpg123("mpg123");

    private String player;

    public String getPlayer() {
        return player;
    }

    public PlayerEnum setPlayer(String player) {
        this.player = player;
        return this;
    }

    // 构造方法
    PlayerEnum(String player) {
        this.player = player;
    }


    // 普通方法
    public static PlayerEnum getBy(String player) {
        for (PlayerEnum e : PlayerEnum.values()) {
            if (e.player.equals(player)) {
                return e;
            }
        }
        return null;
    }
}